<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CalendarViewModel>" %>
<%@ Import Namespace="Samples.Models"%>
<%@ Import Namespace="etcetera.Mvc.UI.Calendar"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Calendar Demo</h2>
    
    <h3><%= Model.Month %> <%= Model.Year %></h3>
    
    <div>
        <%=Html.ActionLink("<", "Index", new { year = Model.PrevYear, month = Model.PrevMonth }) %>&nbsp;&nbsp;&nbsp;
        <%=Html.ActionLink(">", "Index", new { year = Model.NextYear, month = Model.NextMonth }) %>
    </div>
    
    <br />
    
    <%= Html.Calendar(Model.Year, Model.Month)
            .FirstDayInWeek(DayOfWeek.Monday)
            .HighlightToday()
            .ShowPrevNextMonth()
            .DayUrl("/Calendar/{0}/{1}/{2}")
            .Entries(Model.CalendarEntries)
    %>

</asp:Content>
